/*
 * ApplicationInformation.java
 *
 * Created on 7 December 2006, 10:39
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.foment.joliage3.core.system;

/**
 *
 * @author ivan
 */
public class ApplicationInformation {
  
  /** Creates a new instance of ApplicationInformation */
  public ApplicationInformation() {
  }
  
  private static String _name        = null;
  private static String _key         = null;
  private static int    _version     = 0;
  private static int    _subversion  = 0;
  private static int    _revision    = 0;
  
  public static String getName() {
    if (_name == null)
      if (_key == null)
        return "NOT_SET";
      else
        return getKey();
    return _name;
  }
  
  public static void setName(String name) {
    _name = name;
  }

  public static int getVersion() {
    return _version;
  }

  public static void setVersion(int aVersion) {
    _version = aVersion;
  }

  public static int getSubversion() {
    return _subversion;
  }

  public static void setSubversion(int aSubversion) {
    _subversion = aSubversion;
  }

  public static int getRevision() {
    return _revision;
  }

  public static void setRevision(int aRevision) {
    _revision = aRevision;
  }

  public static String getKey() {
    if (_key == null)
      if (_name == null)
        return "NOT_SET";
      else
        return getName().toLowerCase().replace(" ", "_");
    return _key;
  }

  public static void setKey(String aKey) {
    _key = aKey;
  }
  
}
